/*************************************************************************
 *                                                                       *
 * This file is part of the FreeMAPs distribution.  For full copyright   *
 * information, see COPYRIGHT and COPYING.LESSER.                        *
 *                                                                       *
 * Author:           sqbang                                              *
 * Email:            sqbang@ustc.edu                                     *
 * Date:             2011.09.08                                          *
 *                                                                       *
 *************************************************************************/

#include "COMMON/tbox/MathUtilities.h"

namespace FreeMAPs
{

inline
TimePatch::AutoControllerParameters::AutoControllerParameters():
    absolute_error       (1.e-3),
    relative_error       (1.e-4),
    ratio_of_local_error (0.9)
{}


inline bool
TimePatch::is_global() const
{
    return d_is_global;
}


//inline bool
//TimePatch::is_current_time_in_range() const
//{
//    return d_is_current_time_in_range;
//}


//inline void
//TimePatch::set_time_increment_controller(
//    const TimeIncrementController controller)
//{
//    d_time_increment_controller = controller;
//}


inline double
TimePatch::get_start_time() const
{
    return d_start_time;
}


inline void
TimePatch::set_start_time (
    const double start_time)
{
    d_start_time = start_time;
}


inline double
TimePatch::get_end_time() const
{
    return d_end_time;
}


inline void
TimePatch::set_end_time (
    const double end_time)
{
    d_end_time = end_time;
}


inline double
TimePatch::get_fixed_dt() const
{
    return d_fixed_dt;
}


inline void
TimePatch::set_fixed_dt(
    const double fixed_dt)
{
    d_fixed_dt = fixed_dt;
}


//inline double
//TimePatch::get_max_dt() const
//{
//    return d_max_dt;
//}


//inline void
//TimePatch::set_max_dt(
//    const double max_dt)
//{
//    d_max_dt = max_dt;
//}


//inline double
//TimePatch::get_CFL_number() const
//{
//    return d_cfl_number;
//}


//inline TimeIncrementController
//TimePatch::get_time_increment_controller() const
//{
//    return d_time_increment_controller;
//}


//inline Triple
//TimePatch::is_dimensional() const
//{
//    return d_is_dimensional;
//}


//inline const TimePatch::AutoControllerParameters&
//TimePatch::get_auto_controller_parameters()const
//{
//    return d_auto_controller_paras;
//}


//inline void
//TimePatch::set_dimensional_flag(const Triple dimensional_flag)
//{
//    d_is_dimensional = dimensional_flag;
//}

}
